import React, { Component } from 'react'
import Header from '../../components/Header/Header'
import { reqgetbanner } from '../../http/api'
import {  Swiper, Toast } from 'antd-mobile'
import "./mine.less"
export default class Mine extends Component {
    constructor() {
        super()
        this.state = {
            list: []
        }
    }
    componentDidMount() {
        reqgetbanner().then(res => {
            this.setState({
                list: res.data.list
            })
        })
    }
    render() {
        let { list } = this.state
     
        return (
            <div>
                <Header title="我的" back></Header>
              
                <Swiper autoplay loop style={{height:"3.8rem"}}>
                {  
                     list.map(item => (
                        <Swiper.Item key={item.id}>
                         <img src={item.img} alt="" />
                        </Swiper.Item>
                     ))
                 }
                </Swiper>
             
            </div>
        )
    }
}
